<div class="content">
	<style>
	.n-file{}
	.n-file li.dir{border:1px solid red;padding:10px;margin:10px;width:250px;display:inline-block;background-color:#abcdef;}
	.n-file li.file{border:1px solid green;padding:10px;margin:10px;width:250px;display:inline-block;background-color:#FEDCBA;}

	</style>
	
	
	<div class="n-page-head">
		<div class="n-right n-tools">
			<?php
			if(isset($data['dirid'])){
			?>
			<?=n_ui(n_url('nfile','uploadEdit',array('fid'=>$data['dirid'])),'上传文件',"class='n-btn n-btn-ccc n-right'")?>	
			<?=n_ui(n_url('nfile','dirEdit',array('fid'=>$data['dirid'])),'新建文件夹',"class='n-btn n-btn-ccc n-right'")?>
			
			<?php
			}else{
			?>
			<?=n_ui(n_url('nfile','uploadEdit'),'上传文件',"class='n-btn n-btn-ccc n-right'")?>	
			<?=n_ui(n_url('nfile','dirEdit',array('scode'=>$data['scode'])),'新建文件夹',"class='n-btn n-btn-ccc n-right'")?>
			
			<?php
			}
			?>
		
		</div>
		<strong>文件夹</strong>
	</div>


	<div>
		<?php
		if(!empty($data['dir']) || !empty($data['file'])){
		?>
		
		<ul class="n-file">
			
			<?php
			if(!empty($data['dir'])){
			foreach($data['dir'] as $key=>$val){
			?>
			<li class="dir">
				<?=n_ui(n_url("nfile","dirEdit",array("id"=>$val['id'])),"修改","class='n-btn n-btn-ccc n-right'")?>
				<?=n_ui(n_url("nfile","dirDel",array("id"=>$val['id'])),"删除","class='n-btn n-btn-ccc n-right'")?>
				<?=$val['name']?>
				<a href="<?=n_url('nfile','siteIndex',array('scode'=>$data['scode'],'dir'=>$val['id']))?>">查看</a>
				<br />
				上传时间:<?=date("Y-m-d H:i:s",$val['ctime'])?><br />
				<div class="n-warn"><?=empty($val['descript'])?'暂无描述':$val['descript']?></div>
			</li>
			<?php
			}
			}
			?>
	
			<?php
			if(!empty($data['file'])){
			foreach($data['file'] as $key=>$val){
			?>
			<li class="file">
				<?=n_ui(n_url("nfile","fileEdit",array("id"=>$val['id'])),"修改","class='n-btn n-btn-ccc n-right'")?>
				<?=n_ui(n_url("nfile","fileDel",array("id"=>$val['id'])),"删除","class='n-btn n-btn-ccc n-right'")?>
				<?=$val['name']?><br />
				上传时间:<?=date("Y-m-d H:i:s",$val['ctime'])?><br />
				尺寸:<?=$val['size']?>字节<br />
				<div class="n-warn"><?=empty($val['descript'])?'暂无描述':$val['descript']?></div>
			</li>
			<?php
			}
			}
			?>
		</ul>
		<?php
		}else{
		?>
		<div class="n-warn">暂无文件</div>
		<?php
		}
		?>
	</div>

</div>